package com.yqg.education.mapper;

import com.yqg.education.controller.dto.questionDTO;
import com.yqg.education.entity.Question;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Arrays;
import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 张芸博
 * @since 2025-04-08
 */
@Mapper
public interface QuestionMapper extends BaseMapper<Question> {
    List<Question> findPage(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, @Param("courseId") Integer courseId);

    Long findCount(Integer courseId);

    List<Question> stuFindQuestion(@Param("questionIdList") List<Long> questionIdList,
                                   @Param("exampaperId") Long exampaperId);

    List<Question> stuSelectList(@Param("questionIds") List<Long> questionIds);

    List<Question> stufindTrueResultPage(@Param("questionIdList") List<Long> questionIdList,
                                         @Param("exampaperId") Long exampaperId,
                                         @Param("userId") Long userId);
}
